package package_1;

import java.util.Scanner;

public class Check {
	static void legalCheck(String mail) {
		int atIndex = mail.indexOf("@");
		int dotIndex = mail.indexOf(".");
		if(atIndex == -1 || atIndex == 0 || dotIndex == -1 || dotIndex == 0 || dotIndex - atIndex < 1 ) {
			System.out.println("incorrect");
		}
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("please input email:");
		String mail = in.next();
		legalCheck(mail);   
		
		
	}

}
